<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>雅趣书阁</title>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();
    %>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
</head>
<body>

<script type="text/javascript" src="<%=basePath%>/js/jquery-2.0.3.min.js"></script
<%--	<script type="text/javascript" src="<%=basePath%>/js/bootstrap.min.js"></script>--%>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
        integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
        crossorigin="anonymous"></script>

<jsp:include page="header.jsp"></jsp:include>

<!-- 书籍导航条 -->
<%--<nav class="navbar navbar-default" style="--%>
<%--    margin-bottom: 0px;--%>
<%--">--%>
<%--<div class="container-fluid">--%>
<%--    <div class="navbar-header">--%>
<%--        <button type="button" class="navbar-toggle collapsed"--%>
<%--                data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"--%>
<%--                aria-expanded="false">--%>
<%--            <span class="sr-only">Toggle navigation</span> <span--%>
<%--                class="icon-bar"></span> <span class="icon-bar"></span> <span--%>
<%--                class="icon-bar"></span>--%>
<%--        </button>--%>
<%--        <a class="navbar-brand" href="<%=basePath%>/client/ClientServlet?op=category">书籍分类</a>--%>
<%--    </div>--%>
<%--    <div class="collapse navbar-collapse"--%>
<%--         id="bs-example-navbar-collapse-1">--%>
<%--        <ul class="nav navbar-nav">--%>
<%--&lt;%&ndash;            <c:forEach items="${categoryList}" var="c">&ndash;%&gt;--%>
<%--&lt;%&ndash;                <li><a href="<%=basePath%>/client/ClientServlet?op=category&cid=${c.categoryId}">${c.categoryName}</a>&ndash;%&gt;--%>
<%--&lt;%&ndash;                </li>&ndash;%&gt;--%>
<%--&lt;%&ndash;                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&ndash;%&gt;--%>
<%--                aaaaaaaaaaaaaaaaaaa--%>
<%--&lt;%&ndash;            </c:forEach>&ndash;%&gt;--%>
<%--        </ul>--%>
<%--        <!-- 搜索框 -->--%>
<%--        <div style="float: right; margin-right: 7px">--%>
<%--            <form class="navbar-form navbar-left"--%>
<%--                  action="<%=basePath%>/client/ClientServlet?op=search" method="post">--%>
<%--                <div class="form-group">--%>
<%--                    <input type="text" name="search" class="form-control"--%>
<%--                           placeholder="搜索/书籍名称">--%>
<%--                </div>--%>
<%--                <button type="submit" class="btn btn-default">搜索</button>--%>
<%--            </form>--%>
<%--        </div>--%>
<%--    </div>--%>
<%--</div>--%>
<%--</nav>--%>


<table class="table table-bordered table-hover"
       style="margin-left: 16px; width: 1890px">
    <tr>
        <th style="width: 100px">书籍编号</th>
        <th style="width: 100px">书籍图片</th>
        <th style="width: 200px">书籍名称</th>
        <th style="width: 200px">书籍类型</th>
        <th style="width: 200px">书籍作者</th>
        <th style="width: 300px">书籍出版社</th>
        <th style="width: 200px">书籍价格</th>
        <th style="width: 200px">销量</th>
        <th style="width: 200px">操作</th>
    </tr>
    <c:forEach items="${books}" var="s" varStatus="vs">
        <tr class="active">
            <td>${vs.index+1}</td>
            <td><img style="width: 80px; height: 100px"
                     src="${pageContext.request.contextPath}/img/${s.path}/${s.fileName}"/>
            </td>
            <td>《${s.bookName}》</td>
<%--            <td>11111</td>--%>
            <td>${s.category.categoryName}</td>
            <td>${s.bookAuthor}</td>
            <td>${s.bookPress}</td>
            <td><span style="color: rgb(198, 46, 45); font-weight: bold">￥${s.bookPrice}</span></td>
            <td>${s.bookXiaoNumber}</td>
            <td><a
                    href="<%=basePath%>/client/ClientServlet?op=particulars&book_id=${s.bookId}">详情</a></td>
        </tr>
    </c:forEach>
</table>
<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>